const filterRoutes = (routes, identity) => {

    routes = routes.filter(val => {
        return val.meta.author.indexOf(identity) > -1;
    })
    routes = routes.map(v => {
        if (v.children) {
            filterRoutes(v.children, identity)
        }
        return v;
    })
    return routes
}
export default filterRoutes